//
//  UIView+NextController.m
//  ThusMyStyle
//
//  Created by XL on 15/11/15.
//  Copyright (c) 2015年 gintong. All rights reserved.
//

#import "UIView+NextController.h"

@implementation UIView(NextController)

- (UIViewController *)controller
{
    id controller = [self nextResponder];
    while (![controller isKindOfClass:[UIViewController class]]) {
        controller = [controller nextResponder];
    }
    return [controller isKindOfClass:[UIViewController class]]? controller: nil;
}

@end
